package com.zhiche.lisa.oms.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 订单各类地址信息
 * </p>
 *
 * @author qichao
 * @since 2018-06-18
 */
@TableName("lisa_order_location")
public class OrderLocation extends Model<OrderLocation> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 订单ID
     */
	@TableField("order_id")
	private Long orderId;
    /**
     * 提货点编码
     */
	@TableField("lading_location_id")
	private Long ladingLocationId;
    /**
     * 发货点编码
     */
	@TableField("shipping_location_id")
	private Long shippingLocationId;
    /**
     * 交货点编码
     */
	@TableField("delivery_location_id")
	private Long deliveryLocationId;
    /**
     * 创建时间
     */
	@TableField("gmt_create")
	private Date gmtCreate;

	/**
	 * 租户ID
	 */
	@TableField("tenant_id")
	private Long tenantId;

	@TableField("is_delete")
	@TableLogic
	private Integer isDelete;

	@TableField(exist = false)
	private String deliveryLocationName;

	@TableField(exist = false)
	private String shippingLocationName;

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getOrderId() {
		return orderId;
	}

	public void setOrderId(Long orderId) {
		this.orderId = orderId;
	}

	public Long getLadingLocationId() {
		return ladingLocationId;
	}

	public void setLadingLocationId(Long ladingLocationId) {
		this.ladingLocationId = ladingLocationId;
	}

	public Long getShippingLocationId() {
		return shippingLocationId;
	}

	public void setShippingLocationId(Long shippingLocationId) {
		this.shippingLocationId = shippingLocationId;
	}

	public Long getDeliveryLocationId() {
		return deliveryLocationId;
	}

	public void setDeliveryLocationId(Long deliveryLocationId) {
		this.deliveryLocationId = deliveryLocationId;
	}

	public Date getGmtCreate() {
		return gmtCreate;
	}

	public void setGmtCreate(Date gmtCreate) {
		this.gmtCreate = gmtCreate;
	}

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "OrderLocation{" +
			", id=" + id +
			", orderId=" + orderId +
			", ladingLocationId=" + ladingLocationId +
			", shippingLocationId=" + shippingLocationId +
			", deliveryLocationId=" + deliveryLocationId +
			", gmtCreate=" + gmtCreate +
			"}";
	}

	public Long getTenantId() {
		return tenantId;
	}

	public void setTenantId(Long tenantId) {
		this.tenantId = tenantId;
	}

	public String getDeliveryLocationName() {
		return deliveryLocationName;
	}

	public void setDeliveryLocationName(String deliveryLocationName) {
		this.deliveryLocationName = deliveryLocationName;
	}

	public String getShippingLocationName() {
		return shippingLocationName;
	}

	public void setShippingLocationName(String shippingLocationName) {
		this.shippingLocationName = shippingLocationName;
	}
}
